﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace HotelManagement.Common
{
    public class User
    {
        private string m_strID;

        public string ID
        {
            get { return m_strID; }
            set { m_strID = value; }
        }
        private string m_strName;

        public string Name
        {
            get { return m_strName; }
            set { m_strName = value; }
        }
        private string m_strPassword;

        public string Password
        {
            get { return m_strPassword; }
            set { m_strPassword = value; }
        }

        private DataTable m_datUserCollection;

        public DataTable UserCollection
        {
            get 
            {
                if (m_datUserCollection == null || m_datUserCollection.Columns.Count == 0)
                {
                    InitUserCollection();
                }
                return m_datUserCollection; }
            set { m_datUserCollection = value; }
        }

        private void InitUserCollection(){}

        public void ClearUserCollection()
        {
            m_datUserCollection.Clear();
            m_datUserCollection.Dispose();
        }
    }
}
